<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, countial-scale=1.0">
  <title>Document</title>
  <script src="../vue.js"></script>
</head>

<body>
  <div id="app">
    <!-- 点击切换不同的值 显示不同的列表 -->
    <button @click = "count = 1">1</button>
    <button @click = "count = 2">2</button>
    <button @click = "count = 3">3</button>
    <button @click = "count = 4">4</button>

    <div>
      <!-- v-show也是需要接收一个boolean 决定当前元素时display：none还是block -->
      
      <!-- 值不同显示的元素不同 -->
      <ul v-show = "count === 1">
        <li>大理</li>
        <li>丽江</li>
      </ul>
      <ul v-show = "count === 2">
        <li>拉萨</li>
        <li>布达拉宫</li>
      </ul>
      <ul v-show = "count === 3">
        <li>西安</li>
        <li>长沙</li>
      </ul>
      <ul v-show = "count === 4">
        <li>西藏</li>
        <li>青岛</li>
      </ul>
      
    </div>
  </div>
  <script>
    Vue.config.productionTip = false;

    const vm = new Vue({
      el: "#app",
      data() {
        return {
          count: 1
        }
      }
    })
  </script>
</body>

</html>